package com.feituan.wx.controller;

import com.feituan.core.pojo.entity.TypeCoupons;
import com.feituan.core.pojo.response.Response;
import com.feituan.core.service.ITypeCouponsService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/typeCoupons")
@Api(tags = "优惠券类型管理")
public class TypeCouponsController extends BaseController{
    @Autowired
    private ITypeCouponsService typeCouponsService;

    /**
     * 根据优惠券类型查询优惠券
     * @param type type
     */
    @RequestMapping("/selectByType")
    public Response<TypeCoupons>  selectByType(String type) {
        return Response.success(typeCouponsService.selectByType(type));
    }
}
